var r_au_name=[];
var r_au_img=[];
var r_uri=[];
var n=0;
var au_name=[];
var au_name_temp='';
var au_img=[];
var au_img_temp='';
var uri=[];
var uri_temp='';
var cm_nums=[];
var cm_nums_temp=0;

function topauthor(json){
	for(var k=0;k<rcm_nums;k++){
	  var entry=json.feed.entry[k];
	  r_au_name[k]=entry.author[0].name.$t;
	  var ava_src=entry.author[0].gd$image.src;
	  
	  if(ava_src.indexOf('blogblog.com')!=-1){
       if(('uri'in entry.author[0])&&(entry.author[0].uri.$t.indexOf('blogger.com')==-1)){r_au_img[k]=another_au;}
       else {r_au_img[k]=no_photo;}
     }     
	  else {r_au_img[k]=ava_src;}
	  
	  if('uri'in entry.author[0]){r_uri[k]=entry.author[0].uri.$t;}
	  else{r_uri[k]=''}

	}

	for(var i=0;i<rcm_nums;i++){
	  if(i==0){
	    au_name[0]=r_au_name[0];
	    au_img[0]=r_au_img[0];
	    uri[0]=r_uri[0];
	    cm_nums[0]=1;
	    n=1;
	  }
	  else{
	    for(var j=0;j<n;j++){
	      if((r_au_name[i]==au_name[j])&&(r_au_img[i]==au_img[j])&&(r_uri[i]==uri[j])){cm_nums[j]++;break}}
	      if(j>=n){
		au_name[n]=r_au_name[i];
		au_img[n]=r_au_img[i];
		uri[n]=r_uri[i];
		cm_nums[n]=1;
		n++;
	      }
	    }
	  }

	for(i=0;i<n;i++){if(uri[i]==''){cm_nums[i]=0}}

	for(i=0;i<n-1;i++){
	  for(j=i+1;j<n;j++){
	    if(cm_nums[i]<cm_nums[j]){
	      cm_nums[i]=cm_nums_temp;
	      cm_nums[i]=cm_nums[j];
	      cm_nums[j]=cm_nums_temp;

	      au_name[i]=au_name_temp;
	      au_name[i]=au_name[j];
	      au_name[j]=au_name_temp;

	      au_img[i]=au_img_temp;
	      au_img[i]=au_img[j];
	      au_img[j]=au_img_temp;

	      uri[i]=uri_temp;
	      uri[i]=uri[j];
	      uri[j]=uri_temp;
	    }
	  }
	}

	var c_topau='<ul>';
	for(var i=0;(i<au_nums)&&(i<n);i++){
	  if(uri[i]!=''){
	    c_topau+='<li><img class="tau-thumb" src="'+au_img[i]+'"/><div class="tau-cont"><h4><a href="'+uri[i]+'" rel="nofollow" target="_blank">'+au_name[i]+'</a></h4><span> '+cm_nums[i]+' Nhận xét</span></div></li>';
	  }
	}
	c_topau+='</ul>';
	document.write(c_topau);
}
document.write('<script type=\"text/javascript\" src=\"'+homepage+'/feeds/comments/default?alt=json-in-script&max-results='+rcm_nums+'&callback=topauthor\"><\/script>');

